home *** CD-ROM | disk | FTP | other *** search
/ United Public Domain Gold 2 / United Public Domain Gold 2.iso / utilities / pu010.dms / pu010.adf / AshMan < prev    next >
Text File  |  1989-04-05  |  46KB  |  1,651 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                  CONTENTS
  9.  
  10.  
  11.        1.  Introducing Ash.....................................   1
  12.        Installing ASH......................................   2
  13.        What commands work with Ash?........................   2
  14.        1.  What about Run?  3
  15.  
  16.        2.  Shell features......................................   3
  17.        Resident programs...................................   3
  18.        Builtins............................................   4
  19.        IO Redirection......................................   4
  20.        Alias...............................................   5
  21.        1.  Summary of Alias syntax  7
  22.        Script Language.....................................   7
  23.        Environment Variables...............................   8
  24.        1.  Special Variables  10
  25.        Pipes and PipeLines.................................  11
  26.        1.  Show me more pipelines  12
  27.        2.  Show me how to use pipes with scripts  13
  28.        Command Substitution................................  15
  29.        Prompt enhancements.................................  19
  30.        Using Variables and Substitutions in Prompt and
  31.        Alias...............................................  20
  32.  
  33.        3.  Modifying your startup sequence to use ASH..........  22
  34.        Modifying 1.3 startup to take advantage of ARP......  23
  35.  
  36.        4.  Appendix A: Finding a pipe device to work with
  37.        ASH................................................. 23
  38.  
  39.        5.  Appendix B: Bug reports and enhancement
  40.        requests............................................  24
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.                   - i -
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.            Introduction to ASH: The ARP Shell.
  71.  
  72.  
  73.  
  74.             AmigaDOS Resource Project
  75.  
  76.  
  77.        Description of shell features, variables, batch language,
  78.        pipes and command substitution. Includes sample scripts and
  79.        command lines.
  80.  
  81.  
  82.        1.  Introducing Ash
  83.  
  84.        The ARP Shell or 'Ash' is an alternative to the standard CLI
  85.        or 1.3 AmigaDOS shells.  While not claiming to be the last
  86.        word in shell technology, we feel that it provides a
  87.        significant improvement over the customary shells in the
  88.        following areas:
  89.  
  90.       - All improvements introduced by Commodore in the 1.3
  91.         Shell are supported by ASH in either an identical or
  92.         highly compatible fashion.  This includes the Alias
  93.         function, auto-executing batch files and Prompt
  94.         enhancements.  ASH runs both BCPL and non-BCPL
  95.         programs.
  96.  
  97.       - Ash contains many builtin functions which save disk
  98.         access as well as disk and memory bytes.  In
  99.         particular, the entire batch language is built into
  100.         Ash, which provides for much more efficient execution
  101.         of scripts.
  102.  
  103.       - It is possible to replace many of the C: directory
  104.         commands with their builtin equivalents in ASH, and it
  105.         is interesting to compare the sizes involved. The
  106.         original 1.3 commands which ASH contains as builtins
  107.         total over 15,500 bytes!  By contrast, ASH itself is
  108.         less than 8,000 bytes.  To see a list of builtins, type
  109.         a single question mark at the shell prompt, then hit
  110.         return.
  111.  
  112.       - Ash supports true concurrent pipes and command
  113.         substitution, as well as environment variable
  114.         expansion.  These are advanced features not available
  115.         in the 1.3 shell.
  116.  
  117.       - Ash uses the arp.library process functions to run your
  118.         programs, and so uses the ARP resident features.  These
  119.         can save you greatly in memory use, since the stack
  120.         size and data size are encoded inside the program.  ARP
  121.         resident programs are also much safer than the 1.3
  122.         Resident, because arp.library checks the program before
  123.         running it to make sure it has not been damaged, and is
  124.         residentable.  This means that you do not have to crash
  125.  
  126.  
  127.  
  128.                  Page 1
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.        Ash Users manual.      V1.3.0         March 30, 1989
  137.  
  138.  
  139.  
  140.         your computer to discover whether or not a program will
  141.         work as resident.
  142.  
  143.        Installing ASH
  144.  
  145.        If you have ASH as part of the ARP distribution, the ARP
  146.        install program will handle this for you.  Otherwise, you
  147.        should copy ASH to the L: logical directory on your system
  148.        disk*.
  149.  
  150.         If you are using the ARP supplied AShell program you
  151.        should delete the line in the Commodore supplied startup
  152.        sequence which reads something like:
  153.  
  154.  
  155.     Resident CLI L:Shell-Seg SYSTEM pure add; activate Shell
  156.  
  157.  
  158.        since AShell will locate and load ASH for you.  If you
  159.        choose to use the Commodore supplied NewSHELL program and
  160.        still want to use ASH, you want to replace L:Shell-Seg in
  161.        the above line with L:ASH:
  162.  
  163.  
  164.     Resident CLI L:ASH SYSTEM pure add; activate arp shell
  165.  
  166.        The only difference here is that the Commodore NewSHELL
  167.        command will not automatically load the shell into memory if
  168.        it is not present, and so requires extra work in the startup
  169.        script. (Note - you may also need to set the PURE protect
  170.        bit in L:ASH to do this).
  171.  
  172.  
  173.        What commands work with Ash?
  174.  
  175.        As far as we know, all programs work fine with Ash,
  176.        including BCPL programs as distributed by Commodore.  The
  177.        only command that you won't want to use with Ash is the
  178.        Commodore Resident command, you should use Arp's ARes
  179.        instead.  Alternatively, if you prefer the Commodore shell,
  180.        do not replace Resident with ARes.
  181.  
  182.  
  183.  
  184.        __________
  185.  
  186.      * The ARP Install program won't change your startup script
  187.        for you.  If you intend to use Ash, you should alter
  188.        your startup-sequence as described to avoid wasting
  189.        memory.
  190.  
  191.  
  192.  
  193.  
  194.                  Page 2
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.        Ash Users manual.      V1.3.0         March 30, 1989
  203.  
  204.  
  205.  
  206.         Each shell uses a different method of managing the
  207.        resident lists, and so will work only with its own Resident
  208.        loader.  You won't crash if you mis-match these two, but you
  209.        won't be getting any use from the resident features of the
  210.        shell of your choice either.
  211.  
  212.        1.  What about Run?  Run (either ARP's or Commodores) just
  213.        passes your command line to the currently loaded shell.  If
  214.        you have loaded the Commodore shell, then using either the
  215.        ARP Run or Commodore Run will invoke the Commodore Shell.
  216.        If you have loaded Ash, then using either Run command will
  217.        invoke the Arp shell.  This means that your background
  218.        processes invoked with Run (or by the AmigaDOS function call
  219.        Execute ()) will take advantage of resident programs and any
  220.        additional features of whatever shell is loaded.
  221.  
  222.  
  223.        2.  Shell features
  224.  
  225.        We cover all features of the Arp Shell here, including those
  226.        which are shared by the 1.3 Commodore shell.  This is done
  227.        for completeness, and also gives us the opportunity to
  228.        describe any differences in operation between the two.
  229.        Sometimes you might execute a command that Ash needs more
  230.        input to complete.  If you do, then Ash will print a prompt
  231.        (a single '?' mark), and wait for you to type more (remember
  232.        to hit return). If you can't seem to feed the shell what it
  233.        wants, type an EOF character (Control-\), and you will
  234.        usually receive some kind of message that should allow you
  235.        to figure out what's going on for next time.
  236.  
  237.        Resident programs
  238.  
  239.        Resident programs save you memory and loading time, even
  240.        over the use of a ramdisk, by letting the system reuse the
  241.        same code for multiple invocations of the program.  Due to
  242.        limitations of the current Commodore implementation of
  243.        Resident, you cannot mix the Arp ARes command with the
  244.        Commodore Resident command.  You need to use ARes with Ash,
  245.        or Resident with Shell-seg (the 1.3 shell).  You won't crash
  246.        if you mismatch these programs, but you won't be able to use
  247.        Resident programs either.
  248.  
  249.         To make a program resident, simply type:
  250.  
  251.  
  252.         ARes programname
  253.  
  254.  
  255.        Then, the first time you attempt to access 'programname',
  256.        the system will load the program for you, and make it
  257.  
  258.  
  259.  
  260.                  Page 3
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.        Ash Users manual.      V1.3.0         March 30, 1989
  269.  
  270.  
  271.  
  272.        resident.  Each subsequent access will be much quicker,
  273.        since it will run directly from memory. This 'load on
  274.        demand' feature is nice, since you don't have to wait for
  275.        all those programs to be made resident in your startup
  276.        sequence.  Also, if you do not use a program during a
  277.        session, it is not loaded at all, thus saving you memory.
  278.  
  279.          Arp programs (and programs written using the Arp
  280.        conventions) will save you greatly in memory usage.  Each
  281.        program requests only as much stack as it needs (whether
  282.        from disk or from resident), and can save many many bytes
  283.        per-invocation on this alone.  Arp resident programs are
  284.        also smart, doing any data cloning required only if
  285.        resident, diskloaded copies don't need to be cloned, and so
  286.        they are not.
  287.  
  288.         All programs which work on the Commodore list should
  289.        also work on Arp's, although they won't save you as much
  290.        memory as Arp's will, you can still take advantage of the
  291.        load-on-demand and checksum safety factors of the Arp
  292.        resident*.
  293.  
  294.        Builtins
  295.  
  296.        As mentioned above, the shell contains many commands already
  297.        builtin to ASH. To find out which ones, use the '?' command
  298.        (i.e., type ? and then hit return).  A list of all builtin
  299.        commands will be displayed.  See the appropriate section
  300.        below for a description of the commands and their
  301.        descriptions.
  302.  
  303.        IO Redirection
  304.  
  305.        You can redirect program input and output by using the '<',
  306.        '>' and
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.        __________
  316.  
  317.      * If you want fast error message reporting, you can make
  318.        the Fault program resident by doing 'Ares C:FAULT'.
  319.        This will force all error routines in ASH to use the
  320.        resident version of fault.  This won't work with the
  321.        Commodore shell, incidentally.
  322.  
  323.  
  324.  
  325.  
  326.                  Page 4
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.        Ash Users manual.      V1.3.0         March 30, 1989
  335.  
  336.  
  337.  
  338.  
  339.         1: Type <file ; reads from file
  340.  
  341.         2: Type >file ; creates/overwrites to file.
  342.  
  343.         3: Type >>file ; appends/creates file.
  344.  
  345.  
  346.        When the '>' operator is used, the file is created if it
  347.        does not exist. If it does exist, then all its former
  348.        contents are lost.  When the '>>' operator is used, if the
  349.        file already exists the contents are *not* lost, new output
  350.        is appended to the end of the old.  If the file does not
  351.        exist, then it is created.  You can use '>>' to safely
  352.        output to files (for example, in shell scripts) without
  353.        worrying about destroying existing files*.
  354.  
  355.         Note that even scripts can be redirected (either in or
  356.        out).  See the section on scripts for more information.
  357.  
  358.         Another type of IO Redirection is called piping.  It is
  359.        important enough to deserve a special section of its own,
  360.        later on.
  361.  
  362.        Alias
  363.  
  364.        An Alias is a way of renaming commands in the shell without
  365.        actually changing the name of the command on the disk.  This
  366.        is generally better than renaming the command, since if you
  367.        rename your command, other peoples scripts and programs that
  368.        reference the command might not find it.  A common use of
  369.        alias's is to give commands shorter names that are easier to
  370.        type, here are a few:
  371.  
  372.  
  373.         Alias cp copy
  374.         Alias ls List
  375.         Alias rm Delete
  376.         Alias s Status Full
  377.  
  378.  
  379.        Now when you type 'cp', you will get the Copy command, but
  380.  
  381.  
  382.        __________
  383.  
  384.      * This differs from the Commodore shell. Under the
  385.        Commodore shell, if the file does not exist the append
  386.        ('>>') operator will not create the file for you, it
  387.        will abort with an error message.
  388.  
  389.  
  390.  
  391.  
  392.                  Page 5
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.        Ash Users manual.      V1.3.0         March 30, 1989
  401.  
  402.  
  403.  
  404.        with the name you defined.  Other uses for Alias's are to
  405.        provide special names for commonly used functions.  For
  406.        example, the ARP 1.3 Assign command provides a special
  407.        switch which will check to see if a name is already
  408.        specified as a logical device - its syntax is:
  409.  
  410.  
  411.         Assign NAME: Exists
  412.  
  413.  
  414.        which checks to see if NAME: has been assigned, and displays
  415.        its assignment if found.  This is a common option, and you
  416.        can define an alias to shorten the typing and give it a
  417.        meaningful name like this:
  418.  
  419.  
  420.         Alias Exists Assign [] Exists
  421.  
  422.  
  423.        Notice the square brackets?  This is a directive to the
  424.        shell which tells it to replace the brackets with any
  425.        command line input you supply when you invoke the alias.
  426.        For example:
  427.  
  428.  
  429.         Exists S:
  430.  
  431.  
  432.        will cause the shell to evaluate the command 'Assign S:
  433.        Exists'. Notice that the S: has replaced the square brackets
  434.        in the command? Some other useful alias's are listed below:
  435.  
  436.  
  437.         Alias Today    list [] Dates Sort Since Today
  438.         Alias Recent   list [] Dates Sort
  439.         Alias PathList list [] lformat "%S%S"
  440.         Alias Update   Copy [] Flags cqo
  441.         Alias Pri       ChangeTaskPri
  442.  
  443.  
  444.        Another use of Alias is to override the shell's builtin
  445.        commands with a disk based version of the same name.  You
  446.        might want to do this because you prefer another command's
  447.        behavior, or it could be that a bug could crop up in one of
  448.        the builtin commands making it necessary that it be
  449.        replaced.  To do this, simply define the command with the
  450.        full path name:
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.                  Page 6
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.        Ash Users manual.      V1.3.0         March 30, 1989
  467.  
  468.  
  469.  
  470.  
  471.         Alias Endskip C:Endskip
  472.  
  473.  
  474.        this will force the shell to use the version of the command
  475.        stored in the C: directory, rather than the shell's internal
  476.        version.
  477.  
  478.  
  479.        1.  Summary of Alias syntax  To sum up then, you can define
  480.        a new alias as follows:
  481.  
  482.  
  483.         Alias AliasName Body
  484.  
  485.  
  486.        where AliasName is the name you want to use to refer to your
  487.        alias, and Body is the command you wish to be executed.
  488.        Body can contain any legal command, and can optionally
  489.        contain square brackets ('[]') which tell the shell where to
  490.        place additional input from the command line.
  491.  
  492.         To see the current alias's, type Alias by itself.  To
  493.        remove an alias definition, type Alias AliasName.  For
  494.        example:
  495.  
  496.  
  497.         Alias Exists
  498.  
  499.  
  500.        will remove the alias definition for Exists.  If you want to
  501.        redefine an alias, it is not necessary to remove it first.
  502.  
  503.        Script Language
  504.  
  505.        Ash contains the complete AmigaDOS batch language
  506.        internally.  This makes scripts with conditionals (IF ELSE)
  507.        and SKIP commands execute much more quickly.  You can also
  508.        save a lot of disk space by deleting these commands from
  509.        your disk altogether.  Note however, if you have
  510.        conditionals in your startup-sequence, you will have to
  511.        modify your startup-sequence to take advantage of ash's
  512.        builtins, so please don't Delete anything until you are sure
  513.        things are working correctly.
  514.  
  515.         You can execute any script from the command line by
  516.        simply typing its name. Note that to do this, the 'S' and
  517.        the 'E' bits must be turned on (use the protect command for
  518.        this).  The 'E' bit tells the shell the script is
  519.        executable, and the 'S' bit tells the shell that it is a
  520.        script, not a binary executable.  To make a script
  521.  
  522.  
  523.  
  524.                  Page 7
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.        Ash Users manual.      V1.3.0         March 30, 1989
  533.  
  534.  
  535.  
  536.        executable from the command line, you would use a command
  537.        line like this:
  538.  
  539.  
  540.         Protect Scriptname +se
  541.  
  542.  
  543.        To prevent a script from auto-executing, we recommend you
  544.        just clear the 'e' bit, since you can use the 's' bit in the
  545.        listings to remind you that it is a script file, and not a
  546.        program.
  547.  
  548.         Scripts executed in this way appear indistinguishable
  549.        from programs, and you can use the i.o. redirection
  550.        operators (<, >, and >>) to divert the input or output to or
  551.        from files.  Scripts can also be use as the source or the
  552.        sink for pipes. See the section on piping for more
  553.        information.
  554.  
  555.         Other improvements to the script language include much
  556.        more informative error messages and regular handling of
  557.        parameter expansion including <$$>.  Many irritating little
  558.        bugs (such as not recognizing tabs as whitespace) in the
  559.        current Commodore batch language have been fixed as well.
  560.  
  561.         When using scripts with arguments (the .key directive
  562.        and the braket characters), we recommend that you always
  563.        change your braket characters to something other than the
  564.        default using the .BRA and .KET directives.  These were
  565.        chosen badly by the original author of the script language
  566.        since they conflict with the IO redirection operators.
  567.        Perhaps the best choice are the curly braces, since these
  568.        are not used for anything else currently.
  569.  
  570.        Environment Variables
  571.  
  572.        The shell expands environment variables that you supply on
  573.        the command line. To expand a variable, you use the dollar
  574.        ('$') character immediately before it.  Here is an example:
  575.  
  576.  
  577.         Echo "$INCLUDE"
  578.  
  579.  
  580.        If there is an environment variable defined by the name
  581.        INCLUDE, the shell will replace it with value of that
  582.        variable, and the echo command will display it. Note that
  583.        the quotes are not necessary for the variable expansion, but
  584.        they are necessary for Echo, which doesn't like spaces in
  585.        its input (the variable could expand to a value with spaces
  586.        in them).
  587.  
  588.  
  589.  
  590.                  Page 8
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.        Ash Users manual.      V1.3.0         March 30, 1989
  599.  
  600.  
  601.  
  602.         To set the value of an environment variable, just use
  603.        the '=' character:
  604.  
  605.  
  606.         FOO=Bar        ; assign a value to FOO
  607.         Echo $FOO        ; display the value
  608.         Bar            ; echo's output.
  609.  
  610.  
  611.        You can also concatenate environment variables easily enough
  612.        like this:
  613.  
  614.  
  615.         FOO="$FOO"Fly
  616.         Echo $FOO
  617.         BarFly
  618.  
  619.  
  620.        Note that the quotes around the initial environment variable
  621.        are necessary for the shell to know when the variable ends.
  622.        If you use the variable at the end, these quotes are not
  623.        needed, since the dollar sign takes care of delimiting the
  624.        variable.  It follows that if you want to concatenate
  625.        variables, you can do it as follows:
  626.  
  627.  
  628.         Echo "$FOO$FOO$FOO"
  629.  
  630.  
  631.        This will print three copies of the value of foo.  Of
  632.        course, you can also use this in an assignment statement.
  633.  
  634.         To remove an environment variable, give it a null
  635.        assignment:
  636.  
  637.  
  638.         FOO=
  639.  
  640.  
  641.        will remove FOO from the current environment*.
  642.  
  643.  
  644.        __________
  645.  
  646.      * Environment variable expansion in the shell reads both
  647.        the old Manx/Rockiki/Arp environment variables and the
  648.        new Commodore ENV:  definition, in that order.  However,
  649.        setting environment variables from the shell writes only
  650.        the older environment implementation, it does not affect
  651.        ENV:.  If you wish to do this from the shell, contact
  652.        ARP central for a patch to arp.library.  You can always
  653.  
  654.  
  655.  
  656.                  Page 9
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.        Ash Users manual.      V1.3.0         March 30, 1989
  665.  
  666.  
  667.  
  668.        1.  Special Variables  Each invocation of the shell has
  669.        three environment variables which are local to that shell,
  670.        and can be used by you to discover special state information
  671.        about the shell.  These are $, ? and ?2.  The $ variable
  672.        contains the current CLI number, ? contains the return code
  673.        of the last command and ?2 contains the operating systems
  674.        result2 error.  Note that ? and ?2 are changed each time a
  675.        command executes, so if you want to use them, you should
  676.        assign their values to some other variable so that you can
  677.        preserve them.  Here is an example of a script which exits
  678.        with an error message and reports the return code:
  679.  
  680.  
  681.         ; This file fragment illustrates the use of ? and ?2
  682.         Command args    ; execute some command
  683.         RC=$?        ; get return code
  684.         R2=$?2        ; and save result 2
  685.  
  686.         IF NOT VAL $RC EQ 0
  687.         Echo "Command exited with error $RC result2 $R2"
  688.         ENDIF
  689.  
  690.  
  691.        The variable '$' corresponds to the braketed expression <$$>
  692.        introduced by Commodore in 1.3. Generally, it is preferable
  693.        to use $$ without brakets to allow the shell to expand it
  694.        without writing a temporary file (as is required by the
  695.        Commodore convention). Ash supports both.  This is useful in
  696.        making temporary files or assigns or whatever, since it is
  697.        unique to each CLI invocation, although concurrent shell
  698.        processes in ash do share the same number, so you should be
  699.        careful when piping to and from scripts and using this
  700.        variable.  Here is an example that displays all three values
  701.        of these variables in an Echo command:
  702.  
  703.  
  704.         Echo "rc = $? Result2 = $?2 CLI# = $$"
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.        ____________________________________________________________
  715.  
  716.        use the SetEnv program (ARP's or Commodores) to write to
  717.        env:.
  718.  
  719.  
  720.  
  721.  
  722.                  Page 10
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.        Ash Users manual.      V1.3.0         March 30, 1989
  731.  
  732.  
  733.  
  734.        Pipes and PipeLines
  735.  
  736.        Pipes are a way of connecting programs together without
  737.        using temporary files.  As a simple example, say you wanted
  738.        a line numbered listing of your current directory.  One way
  739.        to do this is:
  740.  
  741.  
  742.         List >tmpfile
  743.         Type tmpfile opt n
  744.         Delete tmpfile
  745.  
  746.  
  747.        First we create a tempfile using the list command, then we
  748.        type it using the line number option of type, and then we
  749.        delete our tmpfile.  Using pipes, this would all be
  750.        accomplished as follows*:
  751.  
  752.  
  753.         List | Type opt n
  754.  
  755.  
  756.        The '|' character is the pipe symbol.  It causes Ash to
  757.        connect the output of the list command to the input of Type.
  758.        Aside from not using a temporary file, pipelines such as
  759.        this are much faster than the usual single command
  760.        execution, since Ash takes advantage of the multitasking
  761.        nature of the Amiga to run each one at the same time.  This
  762.        means that List can be preparing more output for Type as
  763.        Type is processing the last input received from list.
  764.  
  765.         More than one command can be used in a pipeline.  Here
  766.        is an example which creates a line numbered hexdump from a
  767.        directory listing:
  768.  
  769.  
  770.         Dir | Type opt h | Type opt n
  771.  
  772.  
  773.        The basic idea behind pipes is to combine commands which do
  774.        one thing with other commands which do something else to get
  775.        the results you want.  In the above example, List doesn't
  776.        create line numbers, while type does. By combining their
  777.  
  778.  
  779.        __________
  780.  
  781.      * In order to use pipes with ASH you must have a pipe
  782.        device. See Appendix A for information on how to obtain
  783.        and mount a pipe device that will work with ash.
  784.  
  785.  
  786.  
  787.  
  788.                  Page 11
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.        Ash Users manual.      V1.3.0         March 30, 1989
  797.  
  798.  
  799.  
  800.        capabilities, you create a super list that also does line
  801.        numbers.  (Note that you must separate the '|'s from the
  802.        commands by whitespace. While this differs from the
  803.        implementation of pipes on other operating systems, it is
  804.        necessary on the Amiga due to the use of '|' in wildcard
  805.        patterns).
  806.  
  807.         Once you get accustomed to the idea of pipes and
  808.        connecting programs, you will wonder how you ever got along
  809.        without them.  In the pipelines above, the Type program acts
  810.        as something called a 'filter'. A filter is any program
  811.        that takes something as input, does something to the input,
  812.        and outputs this altered input. In order to act as filters,
  813.        programs must be able to read from their standard input
  814.        (keyboard) and display to their standard output.  Of the
  815.        standard set of commands that comes on the Workbench disk,
  816.        useful filters are Sort, Type and Search.  Note that only
  817.        the ARP programs can be used in pipe lines, the Commodore
  818.        programs have bugs that prevent them from using the keyboard
  819.        as input*.
  820.  
  821.        1.  Show me more pipelines  The Dir and List programs have a
  822.        lot of options (they probably have too many options, but
  823.        that's a story for another time).  One thing you can't do
  824.        with List is display programs that match a certain set of
  825.        protect bits, for example, you might want to see all the
  826.        files in a directory which are scripts and executable.  To
  827.        do this, you can use a pipeline such as the following:
  828.  
  829.  
  830.         List | Search STDIN " ?s????e? "
  831.  
  832.  
  833.        Note that when you use Search in a pipeline, you must supply
  834.        the STDIN keyword in caps as the filename.  The search
  835.        string was made by examining the usual list output, and
  836.        masking out the protection bits we aren't interested in with
  837.        the '?', which matches any character:
  838.  
  839.  
  840.         -s--rwed        (List output)
  841.         ?s????e?        (our search string)
  842.  
  843.  
  844.  
  845.  
  846.        __________
  847.  
  848.      * Some people might like this.  One person's bug is
  849.        another's feature.
  850.  
  851.  
  852.  
  853.  
  854.                  Page 12
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.        Ash Users manual.      V1.3.0         March 30, 1989
  863.  
  864.  
  865.  
  866.         Another useful example utilizes a pipeline to determine
  867.        how well commented 'C' language files are by combining
  868.        Search and Type:
  869.  
  870.  
  871.         Search *.c /'* | type opt n
  872.  
  873.  
  874.        The idea here is to Search through all the files ending in
  875.        '.c' in the current directory, looking for a comment start
  876.        sequence.  (Notice that we have to use the single quote to
  877.        escape the star, which has a special meaning to Search as a
  878.        pattern.  The single quote tells search to regard the star
  879.        as just a character, not a pattern.).  Once Search has found
  880.        the commented lines, we pass them on to Type to count.  The
  881.        highest numbered line will be the total number of comments
  882.        found in the files.  We don't use the STDIN keyword here,
  883.        because Search is not reading from a pipe, it is acting as
  884.        the source (beginning) of a pipeline.
  885.  
  886.         There are many utilities in the public domain and
  887.        elsewhere that can be used as filters, and since filters are
  888.        so easy to write, they are very convenient to create as you
  889.        need them.
  890.  
  891.  
  892.        2.  Show me how to use pipes with scripts  Combining scripts
  893.        in pipelines provides a convenient way to create new
  894.        commands from old, the applications are limitless. One
  895.        problem shared by many people is updating the software on
  896.        their disks when a new revision comes out.  Often only a
  897.        subset of the distribution is used, or perhaps a different
  898.        organization of the software on the disk.  In any case, it
  899.        rarely works to do a straight copy.  Here is a solution in
  900.        the form of a script that uses pipes and the new Arp Read
  901.        command to copy only those files which already exist in the
  902.        destination directory from the source disk:
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.                  Page 13
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.        Ash Users manual.      V1.3.0         March 30, 1989
  929.  
  930.  
  931.  
  932.  
  933.         .Key Dest/a
  934.         ;Update script: CD to directory with new files, then do
  935.         ;List nohead quick | Update dest:dir/
  936.  
  937.         Lab Loop        ; loop back to here
  938.         Read Filename   ; read the filename from pipe
  939.  
  940.         if $? EQ 1 VAL  ; Read returns 1 on eof
  941.            Echo "Copy complete!"
  942.            Quit 0
  943.         Endif
  944.  
  945.         if Exists <Dest>$File   ; If we have an old copy
  946.           Echo "Copying $File to <Dest>$File"
  947.           Copy $File to <Dest>$File ; copy to new
  948.         Endif
  949.  
  950.         Skip Back Loop
  951.  
  952.  
  953.        Another way to do the same thing is to use the output of the
  954.        List command with its LFORMAT option to send the commands to
  955.        the shell.  (You can send commands to the shell by piping
  956.        them into the builtin command Execute). Here is an example
  957.        which does the same thing using list and LFORMAT, if more
  958.        quietly:
  959.  
  960.  
  961.         cd destdir        ; change to dest
  962.         list srcdir lformat="Copy %S%S to %S" | Execute
  963.  
  964.  
  965.        Read is an interesting and useful command.  It can be used
  966.        to read from the keyboard as well as in a pipe, and it also
  967.        does a certain limited parsing on its input. For example:
  968.  
  969.  
  970.         Read First Last Middle
  971.  
  972.  
  973.        Will break the input up on quoted lines or (if no quotes) on
  974.        white space. The first variable gets the first portion of
  975.        the input, the second gets the second, and the last variable
  976.        gets whatever is left.
  977.  
  978.         Here is an example using List and Read to do an
  979.        interactive version of type:
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.                  Page 14
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.        Ash Users manual.      V1.3.0         March 30, 1989
  995.  
  996.  
  997.  
  998.  
  999.         ; Interactive type: Usage: List nohead | intertype
  1000.  
  1001.         Lab Loop
  1002.         Read Filename Size Protection DateTime
  1003.  
  1004.         if $? EQ 1 VAL
  1005.            Echo "No more files"
  1006.            Quit 0
  1007.         ENdif
  1008.  
  1009.         ask "Type $Filename ?"
  1010.  
  1011.         If WARN
  1012.            Echo "==========================================="
  1013.            Echo "File $Filename last modified on $DateTime"
  1014.            Echo "============================================"
  1015.  
  1016.            Type $Filename
  1017.         Endif
  1018.  
  1019.         skip back loop
  1020.  
  1021.  
  1022.        Notice how we use the capability of Read to break up lists
  1023.        output to display selected information about the file in a
  1024.        custom header.  Many more custom scripts are possible, and
  1025.        are often easier to write the custom programs to do the same
  1026.        thing.  If you are not a programmer, but are familiar with
  1027.        the commands available on the Amiga, you should also have
  1028.        little difficulty in customizing your environment.
  1029.  
  1030.        Command Substitution
  1031.  
  1032.        Another advanced feature which Ash makes available to you is
  1033.        Command Substitution.  This feature allows you to replace a
  1034.        command with its output, and it works like this:
  1035.  
  1036.  
  1037.      Echo "Todays date is $(Date), have a nice day!"
  1038.  
  1039.  
  1040.        When the shell sees the sequence '$(Command)', it runs
  1041.        whatever* Command is (Date, in the example above), and then
  1042.  
  1043.  
  1044.        __________
  1045.  
  1046.      * This is implemented internally using pipes, so you will
  1047.        need to have a pipe device mounted to use this command.
  1048.        Please see Appendix A for information on pipes that will
  1049.  
  1050.  
  1051.  
  1052.                  Page 15
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.        Ash Users manual.      V1.3.0         March 30, 1989
  1061.  
  1062.  
  1063.  
  1064.        replaces the entire string with the output of Command, the
  1065.        parens and dollar sign do not appear in the output at all.
  1066.        One possible outcome of the command line above is:
  1067.  
  1068.  
  1069.         Todays date is Friday 16-Mar-89 10:57:12, have a nice day!
  1070.  
  1071.  
  1072.        You can nest command substitutions, and the substitutions
  1073.        can be any shell command, including a pipeline. Whatever
  1074.        comes out of the end of the pipe is what the shell will use
  1075.        in place of the command.  Here is an example showing nested
  1076.        command substitution:
  1077.  
  1078.  
  1079.         Echo "The current time is $(Echo "$(Date)" len 8)"
  1080.         The current time is 10:57:12
  1081.  
  1082.  
  1083.        This example uses the ability of Echo to take a substring of
  1084.        its input.  First Date is expanded, and then the inner echo
  1085.        is expanded, and eventually the output of this Echo replaces
  1086.        the entire substitution request and the final Echo is
  1087.        evaluated.  This is an extremely useful ability, one which
  1088.        often eliminates the need to write temporary files.  Here is
  1089.        an example of a loop counter using Eval and command
  1090.        substitution in a script:
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.        ____________________________________________________________
  1112.  
  1113.        work with ash.
  1114.  
  1115.  
  1116.  
  1117.  
  1118.                  Page 16
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.        Ash Users manual.      V1.3.0         March 30, 1989
  1127.  
  1128.  
  1129.  
  1130.  
  1131.         .Key loop
  1132.         ; Demo loop
  1133.         .Default loop 10
  1134.         Counter=<loop>  ; initialize counter
  1135.  
  1136.         Lab start
  1137.         Echo "Loop $Counter"
  1138.  
  1139.         Counter=$(Eval $Counter - 1)
  1140.  
  1141.         if val $Counter GT 0
  1142.         skip back start
  1143.         endif
  1144.  
  1145.         Echo "All done"
  1146.  
  1147.  
  1148.        The important line is the one containing Eval.  Eval's
  1149.        default behavior is to print its result, so we can use it in
  1150.        a command substitution expression to update the value of the
  1151.        variable Counter.
  1152.  
  1153.         Another use of environment variables involves the Arp
  1154.        programs Basename and TackOn.  Basename takes a pathname and
  1155.        extracts the filename portion of it:
  1156.  
  1157.  
  1158.         Basename DF1:include/exec/types.h
  1159.         types.h
  1160.  
  1161.  
  1162.        You can also give Basename a suffix to delete.  For example,
  1163.        to change a file ending in .c to one ending in .o, try this:
  1164.  
  1165.  
  1166.         Echo "$(Basename file/program.c .c).o"
  1167.         program.o
  1168.  
  1169.  
  1170.        TackOn takes a pathname and a filename, and tacks the
  1171.        filename onto the end of the pathname*.
  1172.  
  1173.  
  1174.        __________
  1175.  
  1176.      * You could do this with normal variable concatenation
  1177.        except that some pathnames contain a ':' character.
  1178.        TackOn handles this condition more efficiently than a
  1179.        shell comparison could.
  1180.  
  1181.  
  1182.  
  1183.  
  1184.                  Page 17
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.        Ash Users manual.      V1.3.0         March 30, 1989
  1193.  
  1194.  
  1195.  
  1196.  
  1197.         Tackon DF1:include exec
  1198.         DF1:include/exec
  1199.  
  1200.         Tackon DF1:include/exec types.h
  1201.         DF1:include/exec/types.h
  1202.  
  1203.  
  1204.        You can use these two commands to make your scripts much
  1205.        more robust.  Here is another example of the update script
  1206.        given earlier. This one handles filenames much better, and
  1207.        also has a better user interface:
  1208.  
  1209.  
  1210.         .Key Dest/a
  1211.         ; Update script: version 2.
  1212.         ; usage: pathlist | update dest
  1213.         ;
  1214.  
  1215.         Lab Loop
  1216.         Read Sourcename ; read source filename from pipe
  1217.  
  1218.         if val $? EQ 1
  1219.            Echo "Copy complete!"
  1220.            Quit 0
  1221.         ENDIF
  1222.  
  1223.         tmp="$(Basename $Sourcename)"
  1224.         Destname="$(Tackon <Dest> $tmp)"
  1225.  
  1226.         if Exists $Destname
  1227.            Echo "Copying $Sourcename to $Destname"
  1228.            Copy $Sourcename to $Destname
  1229.         Endif
  1230.  
  1231.         Skip Back Loop
  1232.  
  1233.  
  1234.        Notice that this uses the alias PathList shown earlier to
  1235.        generate full pathnames for the pipe.  This version of the
  1236.        update script is much more robust than the earlier one,
  1237.        since the user can type the destination directory in a
  1238.        number of ways, and does not have to CD to the source
  1239.        directory he wants to update from.  Again, the interesting
  1240.        lines are where the destination filename is generated.  It
  1241.        is quite simple, first we use Basename to extract the
  1242.        filename from the piped input, and then we use TackOn to
  1243.        append it to the destination directory name.  You can take
  1244.        advantage of the fact that command substitution nests to
  1245.        eliminate the temporary variable by doing:
  1246.  
  1247.  
  1248.  
  1249.  
  1250.                  Page 18
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.        Ash Users manual.      V1.3.0         March 30, 1989
  1259.  
  1260.  
  1261.  
  1262.  
  1263.         Destname="$(Tackon <Dest> $(Basename $Sourcename))"
  1264.  
  1265.  
  1266.        Another useful thing you can do with command substitution is
  1267.        to use it to generate a list of filenames for a command that
  1268.        does not accept wildcards.  There are many programs
  1269.        available in the public domain and elsewhere that accept
  1270.        multiple commands but do not let you use wildcards. To
  1271.        generate a list of files for them to use, you can use the
  1272.        statement:
  1273.  
  1274.  
  1275.         Program "$(Dir)"
  1276.  
  1277.  
  1278.        Of course, you can use any of the options to Dir, or the
  1279.        list command to generate exactly the file list you want.  To
  1280.        check on your file list before passing it to the program you
  1281.        can do:
  1282.  
  1283.  
  1284.         Echo "$(Dir)"
  1285.  
  1286.  
  1287.        first.  Note that there is currently a limit of 1000
  1288.        characters to the total length of the argument line in ash
  1289.        (the total command line length is 1256 characters, including
  1290.        the name of the command).
  1291.  
  1292.        Prompt enhancements
  1293.  
  1294.        Ash supports all the prompt enhancements introduced by
  1295.        Commodore in their 1.3 shell.  You can use "%S" in the
  1296.        prompt definition to display the name of the current
  1297.        directory, and you can use "%N" to display the current CLI
  1298.        number. Ash supports all these, as well as %P which acts
  1299.        the same as %S*.  All of these can be in upper or lower
  1300.        case.
  1301.  
  1302.  
  1303.  
  1304.  
  1305.        __________
  1306.  
  1307.      * This was done to be compatible with earlier releases of
  1308.        the ARP software. Until Commodore released the 1.3
  1309.        shell, one of the only ways to get the current directory
  1310.        string in your prompt was with ARP's Prompt command, and
  1311.        it used %P.
  1312.  
  1313.  
  1314.  
  1315.  
  1316.                  Page 19
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.        Ash Users manual.      V1.3.0         March 30, 1989
  1325.  
  1326.  
  1327.  
  1328.         You can also have the prompt expand environment
  1329.        variables and utilize command substitution in prompt lines
  1330.        as explained below.
  1331.  
  1332.        Using Variables and Substitutions in Prompt and Alias
  1333.  
  1334.        The shell will handle environment expansion and command
  1335.        substitution as well as pipes in prompt strings and aliases.
  1336.        The methods for including these in each one are the same,
  1337.        which is why they are discussed together here.
  1338.  
  1339.         You can use command substitution in your shell prompt
  1340.        to do things like display the current time by using the Date
  1341.        command.  Initially, you might try something like this:
  1342.  
  1343.  
  1344.         Prompt "$(Date)"
  1345.  
  1346.  
  1347.        which would appear to work.  In fact, you might not notice
  1348.        it didn't work until the morning, when the bright light of
  1349.        the sun came pouring through the windows of your computer
  1350.        room.  What you really need to do is this:
  1351.  
  1352.  
  1353.         Prompt "\$(Date)"
  1354.  
  1355.  
  1356.        Notice the escape character before the $?  This tells the
  1357.        shell to delay evaluation of the prompt string until the
  1358.        prompt is actually displayed*.  Without the escape
  1359.        character, the date command gets expanded immediately, and
  1360.        so the time in your prompt gets set permanently to whatever
  1361.        it was when you issued the prompt command.  If you want to
  1362.        only see the time portion of the string, you can do it like
  1363.        this:
  1364.  
  1365.  
  1366.         Prompt "\$(Echo len 8 \"\$(Date)\")\n> "
  1367.  
  1368.  
  1369.  
  1370.  
  1371.        __________
  1372.  
  1373.      * These examples use the \ character for an escape
  1374.        character.  If you have another preference, or if you
  1375.        use the default ('*'), then just replace the backslashes
  1376.        in this section with the escape character of your
  1377.        choice.
  1378.  
  1379.  
  1380.  
  1381.  
  1382.                  Page 20
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.        Ash Users manual.      V1.3.0         March 30, 1989
  1391.  
  1392.  
  1393.  
  1394.        This might look a little daunting, but most of the escape
  1395.        sequences (with the exception of \n, which is there for
  1396.        cosmetic purposes to print a newline as part of the prompt),
  1397.        are there to force delayed evaluation on the shell.  Quotes
  1398.        are necessary around $(Date) because the 1.3 Echo requires
  1399.        them.  This means they must also be escaped, otherwise, the
  1400.        prompt command will regard them as delimiters and give you a
  1401.        "too many arguments" error.
  1402.  
  1403.         The same thing is true as far as environment variable
  1404.        expansion is concerned. It is interesting to be able to
  1405.        display the return codes from the programs you run in the
  1406.        shell prompt.  This is easy to do using the escape trick
  1407.        shown above:
  1408.  
  1409.  
  1410.         Prompt "RC = \$? R2 = \$?2\n> "
  1411.  
  1412.  
  1413.        Any environment variable can be displayed in this manner.
  1414.  
  1415.         Alias's are similar. In fact, aliases are a little
  1416.        clearer, because you can see what is actually stored there
  1417.        by typing Alias without any arguments.  Here is an example
  1418.        that might clarify the above discussion:
  1419.  
  1420.  
  1421.         Alias ThisTime Echo "$(Date)"
  1422.  
  1423.         Alias CurrentTime Echo "\$(Date)"
  1424.  
  1425.  
  1426.        If you now type 'Alias' <ret>, this is how the display
  1427.        looks:
  1428.  
  1429.  
  1430.         Alias <ret>
  1431.             CurrentTime=Echo "$(Date)"
  1432.             ThisTime=Echo "Saturday 18-Mar-89 11:49:31"
  1433.  
  1434.  
  1435.        Notice that the ThisTime definition contains the expanded
  1436.        string from when the alias was defined. The CurrentTime
  1437.        definition, because we used an escaped dollar in its
  1438.        definition, contains a command that will actually display
  1439.        the current time when it is invoked*.
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.                  Page 21
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.        Ash Users manual.      V1.3.0         March 30, 1989
  1457.  
  1458.  
  1459.  
  1460.         You can use pipes inside of Alias's if you need too,
  1461.        but the same principles apply.  You must escape all the pipe
  1462.        characters you use in order to prevent the shell from trying
  1463.        to pipe away immediately:
  1464.  
  1465.  
  1466.         Alias Allc Dir [] opt a \| Search STDIN *.c
  1467.  
  1468.  
  1469.  
  1470.        3.  Modifying your startup sequence to use ASH
  1471.  
  1472.        Before trying to modify your startup-sequence in this way,
  1473.        please make a copy of your disk and work from that.  Then,
  1474.        when you are sure it is working, you can make the changes on
  1475.        the main disk.  We are not trying to scare you, but it is
  1476.        easy to make mistakes when doing things like this.
  1477.  
  1478.         The main advantage to modifying your startup-sequence
  1479.        to use Ash is to take advantage of the faster executing
  1480.        conditionals language builtin to ash and/or some of the nice
  1481.        features of ash such as variable expansion or command
  1482.        substitution. If you don't use any conditionals in your
  1483.        startup-script, or don't want to use any of the Ash features
  1484.        in your startup-script, then you can skip this section, but
  1485.        please see the section on the 1.3 startup.
  1486.  
  1487.         What you will want to do is break out a portion of your
  1488.        startup-script file into a special init file called shell-
  1489.        boot. (You can call it whatever you want, but don't call it
  1490.        shell-startup unless you want it to be executed whenever you
  1491.        invoke a new shell).  Place most of your commands in this
  1492.        shell-boot file, and then let your startup-sequence file
  1493.        have the single command:
  1494.  
  1495.  
  1496.         AShell From S:Shell-Boot
  1497.  
  1498.  
  1499.        That's all there is to it!
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.        __________
  1506.  
  1507.      * Of course, if you really want an alias to just display
  1508.        the output of Date, this is much less efficient that
  1509.        just using Date as in "Alias dt Date".
  1510.  
  1511.  
  1512.  
  1513.  
  1514.                  Page 22
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.        Ash Users manual.      V1.3.0         March 30, 1989
  1523.  
  1524.  
  1525.  
  1526.        Modifying 1.3 startup to take advantage of ARP
  1527.  
  1528.        In general, you can speed up your startup sequence file by
  1529.        combining more commands on one line.  Most of the Commodore
  1530.        commands still do not accept multiple input arguments, while
  1531.        most of ARP's always have.  By doing all of your assigns and
  1532.        mounts on one line you save a little bit of time.
  1533.  
  1534.         If you are using ASH, then you should definitely remove
  1535.        all the Resident stuff from StartupII (on a virgin 1.3
  1536.        workbench disk), and replace it with ARes command lines.
  1537.        Note that a lot of the things Commodore suggests you make
  1538.        resident are built into ash, so you shouldn't just do a
  1539.        global search and replace.  Replacing Resident with ARes
  1540.        will dramatically speed up your startup-sequence times,
  1541.        since the Arp resident is 'load-on-demand'.  The command
  1542.        will only be loaded when you invoke it, not when you use
  1543.        ARes (unless you use the Force keyword). This also saves you
  1544.        memory, since if you don't use the command it is not made
  1545.        resident.
  1546.  
  1547.  
  1548.        4.  Appendix A: Finding a pipe device to work with ASH
  1549.  
  1550.        The only pipe device known to work with ash at this time is
  1551.        PIP:, which is part of conman, a console handler replacement
  1552.        by William Hawes. If you have conman, you already have PIP,
  1553.        otherwise, in order to use the full features of ASH you will
  1554.        have to obtain a copy.  Fortunately, this is easy to do, it
  1555.        is widely available on bulletin boards and from users groups
  1556.        as shareware.
  1557.  
  1558.         Once you have installed conman as described in the
  1559.        conman documentation, make sure you have an entry such as
  1560.        the following in your mountlist file:
  1561.  
  1562.        PIP:    Handler = L:ConHandler
  1563.             Stacksize = 600
  1564.             Priority = 5
  1565.             GlobVec = 0
  1566.         #
  1567.  
  1568.  
  1569.        Once you have done this, you can place a mount pip: command
  1570.        in your startup-sequence, and start playing with pipes.
  1571.  
  1572.         Note that the Commodore PIPE: device supplied with the
  1573.        1.3 distribution does not work with ASH's internal pipes
  1574.        (using the '|' character). PIPE: uses only named pipes, ASH
  1575.        requires unnamed pipes internally.  You can use both PIP:
  1576.        and PIPE: together if you need both named and unnamed pipes
  1577.  
  1578.  
  1579.  
  1580.                  Page 23
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.        Ash Users manual.      V1.3.0         March 30, 1989
  1589.  
  1590.  
  1591.  
  1592.        and we have also heard rumors of someone working on an
  1593.        enhancement to PIPE: to allow it to support unnamed pipes as
  1594.        well, but nothing definite is known about this new super
  1595.        pipe.
  1596.  
  1597.  
  1598.  
  1599.        5.  Appendix B: Bug reports and enhancement requests
  1600.  
  1601.        If you find a bug in Ash or any of the Arp software, it is
  1602.        important that you report it, so that we can fix it.  Note
  1603.        that ARP is distributed without a Warranty of any kind, but
  1604.        we still want to fix our bugs.  When you make a bug report,
  1605.        it helps if you can state at the top of the page which Arp
  1606.        program is the problem, this helps to route the report to
  1607.        the person(s) currently working on that aspect of the ARP
  1608.        project.  It is also important to give enough information
  1609.        for us to reproduce the problem. Right or wrong, if we can't
  1610.        reproduce the problem we tend to assume it is operator error
  1611.        and not worry about it.
  1612.  
  1613.         Enhancement requests are similar, we are very
  1614.        interested in requests for enhancements or ideas for new Arp
  1615.        software.  Things we would like to add to ash (for example)
  1616.        are:
  1617.  
  1618.      1.  Complete subshell implementation. This is only
  1619.          partially implemented currently, pipes and command
  1620.          substitution run in subshells.
  1621.  
  1622.      2.  String operations on variables.  Probably not csh
  1623.          model. Note that you can do a limited amount of this
  1624.          with Echo.
  1625.  
  1626.      3.  Enhancements to batch language, things like a for
  1627.          command, possibly a case statement, others.
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.                  Page 24
  1647.  
  1648.  
  1649.  
  1650.  
  1651.